package com.ph.irp.base.materialassistantattribute.service.impl;

import java.util.List;

import com.ph.irp.base.materialassistantattribute.dao.AssistantAttributeDao;
import com.ph.irp.base.materialassistantattribute.service.AssistantAttributeService;
import com.ph.irp.model.PBaseMaterialAssistantattribute;

public class AssistantAttributeServiceImpl implements AssistantAttributeService {
	private AssistantAttributeDao attributeDaoProxy;

	public AssistantAttributeDao getAttributeDaoProxy() {
		return attributeDaoProxy;
	}

	public void setAttributeDaoProxy(AssistantAttributeDao attributeDaoProxy) {
		this.attributeDaoProxy = attributeDaoProxy;
	}

	@Override
	public void addAssistantAttribute(PBaseMaterialAssistantattribute model)
			throws Throwable {
		attributeDaoProxy.addAssistantAttribute(model);
	}

	@Override
	public void deleteAssistantAttribute(Object[] id) throws Throwable {
		for (int i = 0; i < id.length; i++) {
			attributeDaoProxy.deleteAssistantAttribute(Integer
					.valueOf((String) id[i]));
		}

	}

	@Override
	public List<PBaseMaterialAssistantattribute> getAllAssistantAttribute()
			throws Throwable {
		return attributeDaoProxy.getAllAssistantAttribute();
	}

	public List<PBaseMaterialAssistantattribute> getAssistantAttributeByCondition(
			PBaseMaterialAssistantattribute model) throws Throwable {
		return attributeDaoProxy.getAssistantAttributeByCondition(model);
	}

	@Override
	public PBaseMaterialAssistantattribute getAssistantattributeById(int id)
			throws Throwable {
		return attributeDaoProxy.getAssistantAttributeById(id);
	}

	public List<PBaseMaterialAssistantattribute> getAssistantattributeByTypeId(
			int assistantAttributeTypeId) throws Throwable {
		return attributeDaoProxy
				.getAssistantattributeByTypeId(assistantAttributeTypeId);
	}

	@Override
	public void updateAssistantAttribute(PBaseMaterialAssistantattribute model)
			throws Throwable {
		attributeDaoProxy.updateAssistantAttribute(model);
	}

}
